<div class="row banner bg-info basics">
  <div class="vertical-middle">
    <label class="acc-label vertical-middle p-0">
      {{t "hostsPage.hostPage.ipAddress"}}:
    </label>
    <div class="inline-block">
      {{node-ip model=model.node textMuted=false}}
    </div>
  </div>
  <div class="vertical-middle">
    <label class="acc-label vertical-middle p-0">
      {{#if model.node.isContainerD}}
        {{t "hostsPage.hostPage.containerDVersion"}}:
      {{else}}
        {{t "hostsPage.hostPage.dockerVersion"}}:
      {{/if}}
    </label>
    {{model.node.versionBlurb}}
  </div>
  <div class="vertical-middle">
    <label class="acc-label vertical-middle p-0">
      {{t "generic.created"}}:
    </label>
    {{date-calendar model.node.created}}
  </div>
</div>

<div class="row banner bg-info basics">
  <div class="vertical-middle">
    <label class="acc-label vertical-middle p-0">
      {{t "hostsPage.hostPage.kubeletVersion"}}:
    </label>
    {{model.node.info.kubernetes.kubeletVersion}}
  </div>
  <div class="vertical-middle">
    <label class="acc-label vertical-middle p-0">
      {{t "hostsPage.hostPage.kubeProxyVersion"}}:
    </label>
    {{model.node.info.kubernetes.kubeProxyVersion}}
  </div>
  <div class="vertical-middle">
    <label class="acc-label vertical-middle p-0">
      {{t "hostsPage.hostPage.operatingSystem"}}:
    </label>
    {{model.node.osBlurb}} <span class="text-small text-muted">{{model.node.info.os.kernelVersion}}</span>
  </div>
</div>

{{nodes-live nodes=model.nodes}}

{{node-conditions conditionsSource=model.node.conditions}}

<section>
  {{#accordion-list as |al expandFn|}}
    {{#if scope.currentCluster.isMonitoringReady}}
      {{#metrics-summary
        classNames="mb-20"
        expandAll=al.expandAll
        expandFn=expandFn
        grafanaUrl=model.node.grafanaUrl
        title=(t "clusterDashboard.sections.node")}}
        {{node-metrics resourceId=model.node.id}}
      {{/metrics-summary}}
    {{/if}}
    {{resource-condition-list
      resourceType=(t "generic.node")
      conditions=model.node.conditions
      expandAll=al.expandAll
      expandFn=expandFn
    }}
    {{#if isK3sNode}}
      <div class="mt-20">
        {{#accordion-list-item
           title=(t "clusterDashboard.k3sInfo.title")
           detail=(t "clusterDashboard.k3sInfo.detail")
           expandAll=expandAll
           expand=(action expandFn)
           as | parent |
        }}
          <div class="row">
            <K3sNodeArgs @node={{model.node}} />
            <K3sNodeEnvVar @node={{model.node}} />
          </div>
        {{/accordion-list-item}}
      </div>
    {{/if}}
    <div class="mt-20">
      {{system-info-section
        node=model.node
        expandAll=al.expandAll
        expandFn=expandFn
      }}
    </div>
    <div class="mt-20">
      {{labels-section
        model=model.node
        showKind=false
        expandAll=al.expandAll
        expandFn=expandFn
      }}
    </div>
    <div class="mt-20">
      {{annotations-section
        model=model.node
        expandAll=al.expandAll
        expandFn=expandFn
      }}
    </div>
    <div class="mt-20">
      {{taints-section
        taints=model.node.taints
        expandAll=al.expandAll
        expandFn=expandFn
      }}
    </div>
  {{/accordion-list}}
</section>